﻿using System;

namespace HeroldIT.Dnn.Modules
{
    /// <summary>
    /// Provides generic EventArgs with a typed argument parameter.
    /// </summary>
    /// <typeparam name="TArgument">The type of the event's argument.</typeparam>
    public class EventArgs<TArgument> : EventArgs
    {
        #region properties

        /// <summary>
        /// Gets the argument passed to the event.
        /// </summary>
        public TArgument Argument
        {
            get;
            private set;
        }

        #endregion

        #region constructors

        /// <summary>
        /// Creates new EventArgs with the given <paramref name="argument"/>.
        /// </summary>
        /// <param name="argument">The argument to pass to the event.</param>
        public EventArgs(TArgument argument)
        {
            this.Argument = argument;
        }

        #endregion
    }
}
